Add readiness serving contract#177
Conversation
|
Warning Review limit reached
More reviews will be available in 50 minutes and 15 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR implements a stable readiness serving and freshness contract by adding a new grouped ChangesReadiness serving and freshness contract
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@docs/ai-plans/2026-06-06-issue-166-readiness-serving-freshness-contract.html`:
- Line 22: Update the stale status badge: find the <p class="badge"> element
that currently contains the text "Approval required before implementation" and
replace its content to reflect the document's true state (e.g., "Approved and
implemented" or "Implemented") so the badge matches the later
approval/implementation notes in the document.
In `@internal/health/readiness.go`:
- Around line 377-399: The function readinessServingState currently defaults to
ReadinessServingFresh when no confidence/reason are provided; change it to treat
evidence-free input as missing by checking for empty components (len(components)
== 0) and empty reason and setting status = ReadinessServingMissing in that case
before the other conditionals; update readinessServingState (and keep the
existing hasComponentFreshness checks, ReadinessComponentSummary copying, and
ReadinessServingState construction) so requests coming from the e == nil path
are classified as Missing rather than Fresh.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 01f90aa6-4610-4895-8af3-9f0f34f1fb80
📒 Files selected for processing (8)
README.mddocs/ai-plans/2026-06-06-issue-166-readiness-serving-freshness-contract.htmlinternal/health/headline.gointernal/health/readiness.gointernal/health/readiness_evidence_test.gointernal/health/scoring.gointernal/health/types.gointernal/mcpserver/tools.go
Summary
Closes #166
Tests
Summary by CodeRabbit
New Features
Documentation